package com.jtech.together.util;

/**
 * bmob异常代码解析
 * Created by wuxubaiyang on 2017/5/10.
 */

public class BmobUtil {
    public static String getErrorMessage(int code) {
        switch (code) {
            case 101:
                return "用户名或密码错误";
            case 202:
                return "用户名已存在";
            case 9001:
                return "Application Id为空，请初始化";
            case 9002:
                return "解析返回数据出错";
            case 9003:
                return "上传文件出错";
            case 9004:
                return "文件上传失败";
            case 9005:
                return "批量操作只支持最多50条";
            case 9006:
                return "objectId为空";
            case 9007:
                return "文件大小超过10M";
            case 9008:
                return "上传文件不存在";
            case 9009:
                return "没有缓存数据";
            case 9010:
                return "网络超时";
            case 9011:
                return "BmobUser类不支持批量操作";
            case 9012:
                return "上下文为空";
            case 9013:
                return "格式不正确";
            case 9014:
                return "第三方账号授权失败";
            case 9015:
                return "其他错误";
            case 9016:
                return "无网络连接，请检查您的手机网络";
            case 9017:
                return "第三方错误，请重试";
            case 9018:
                return "参数不能为空";
            case 9019:
                return "格式不正确：手机号码、邮箱地址、验证码";
            case 9020:
                return "保存CDN信息失败";
            case 9021:
                return "文件上传缺少wakelock权限";
            case 9022:
                return "文件上传失败，请重新上传";
            case 9023:
                return "请调用Bmob类的initialize方法去初始化SDK";
            default:
                return "未知错误";
        }
    }
}